package com.lyncs.ods.modules.txn.model;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

import com.lyncs.ods.annotation.NeedLog;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.apache.ibatis.type.JdbcType;

/**
 * <p>
 * 预约单总表
 * </p>
 *
 * @author alex
 * @since 2022-04-09
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("order_info")
@ApiModel(value = "OrderInfo对象", description = "预约单总表")
public class OrderInfo implements Serializable, TxnCommonInfo {

    //private static final long serialVersionUID = 1L;

    @ApiModelProperty("订单id")
    @TableId(value = "id", type = IdType.INPUT)
    private Long id;

    @ApiModelProperty("卖方企业id")
    @TableField("seller_id")
    private Long sellerId;

    @ApiModelProperty("买方企业id")
    @TableField("buyer_id")
    private Long buyerId;

    @ApiModelProperty("订单名称")
    @TableField("order_name")
    @NeedLog
    private String orderName;

    @ApiModelProperty("sku类别数")
    @TableField("category_count")
    private Integer categoryCount;

    @ApiModelProperty("预计交付时间")
    @TableField("estimated_delivery_time")
    @NeedLog
    private LocalDateTime estimatedDeliveryTime;

    @ApiModelProperty("货币")
    @TableField("currency")
    @NeedLog
    private String currency;

    @ApiModelProperty("订单日期")
    @TableField("start_date")
    @NeedLog
    private LocalDate startDate;

    @ApiModelProperty("目的地港/机场")
    @TableField("destination_port")
    @NeedLog
    private String destinationPort;

    @ApiModelProperty("包装")
    @TableField("packing")
    @NeedLog
    private String packing;

    @ApiModelProperty("唛头")
    @TableField("shipping_marks")
    @NeedLog
    private String shippingMarks;

    @ApiModelProperty("贸易规则")
    @TableField("trading_terms")
    @NeedLog
    private String tradingTerms;

    @ApiModelProperty("支付方式")
    @TableField("payment_terms")
    @NeedLog
    private String paymentTerms;

    @ApiModelProperty("运输方式")
    @TableField("shipment")
    @NeedLog
    private String shipment;

    @ApiModelProperty("装运港/机场")
    @TableField("loading_port")
    @NeedLog
    private String loadingPort;

    @ApiModelProperty("转运港/机场")
    @TableField("transshipment_port")
    @NeedLog
    private String transshipmentPort;

    @ApiModelProperty("自定义字段信息")
    @TableField(value = "custom_fields", updateStrategy = FieldStrategy.IGNORED)
    private String customFields;

    @ApiModelProperty("附件")
    @TableField(value = "attachment", updateStrategy = FieldStrategy.IGNORED)
    private String attachment;

    @ApiModelProperty("状态：0.草稿；1.已创建；2.部分交付；3.全部交付")
    @TableField("status")
    private Integer status;

    @ApiModelProperty("备注")
    @TableField("remark")
    @NeedLog
    private String remark;

    @ApiModelProperty("标签信息")
    @TableField(value = "tag_info", updateStrategy = FieldStrategy.IGNORED)
    private String tagInfo;

    @ApiModelProperty("创建者用户id")
    @TableField("creator")
    private Long creator;

    @ApiModelProperty("创建者所属企业ID")
    @TableField("creator_company_id")
    private Long creatorCompanyId;

    @ApiModelProperty("最后更新用户id")
    @TableField("last_updater")
    private Long lastUpdater;

    @ApiModelProperty("创建时间")
    @TableField("create_time")
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    @TableField("update_time")
    private LocalDateTime updateTime;
}
